<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 200px;
            height: 200px;
            background-color: pink;
            /* 盒子水平居中 */
            margin: 0 auto;
            /* 文字水平居中 */
            text-align: center;
            /* 行高等于盒子高 让文字垂直居中 */
            line-height: 200px;
        }
        
        .box1 {
            box-sizing: border-box;
            width: 200px;
            height: 200px;
            background-color: skyblue;
            margin: 0 auto;
            padding: 10px;
            margin-top: 30px;
        }
    </style>
</head>

<body>
    <div class="box">
        行胜于言
    </div>

    <div class="box1"></div>
</body>

</html>